package com.example.mapp;

import com.example.entity.authority.PartyByFile;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by youkun on 2018/3/21.
 * 机构和文件的关联
 */
@Mapper
public interface PartyByFileMapp {

    @Insert("insert into party_by_file (file_Id,party_Id) values (#{fileId},#{partyId})")
    int insert(PartyByFile partyByFile)throws Exception;

    @Delete("delete from  party_by_file where party_id=#{id}")
    int deleteByPartyId(String id)throws Exception;

    @Select(" select * from party_by_file where party_id=#{id}")
    List<PartyByFile> findByPartyId(String id)throws Exception;
}
